package(default_visibility=["//visibility:public"])

load("@io_bazel_rules_sass//sass:sass.bzl", "sass_library", "sass_binary")
load("//tools:defaults.bzl", "ng_module", "ng_test_library", "ng_web_test_suite")

ng_module(
  name = "table",
  srcs = glob(["**/*.ts"], exclude=["**/*.spec.ts"]),
  module_name = "@angular/material/table",
  assets = [":table.css"],
  deps = [
    "@angular//packages/common",
    "@angular//packages/core",
    "@rxjs",
    "@rxjs//operators",
    "//src/cdk/coercion",
    "//src/cdk/table",
    "//src/lib/core",
    "//src/lib/paginator",
    "//src/lib/sort",
  ] + glob(["**/*.html"]),
)

# TODO(jelbourn): replace this w/ sass_library when it supports acting like a filegroup
filegroup(
  name = "table_scss_partials",
  srcs = glob(["**/_*.scss"]),
)

sass_binary(
  name = "table_scss",
  src = "table.scss",
  deps = ["//src/lib/core:core_scss_lib"],
)

sass_library(
  name = "theme",
  srcs = glob(["**/*-theme.scss"]),
)

ng_test_library(
  name = "table_test_sources",
  srcs = glob(["**/*.spec.ts"]),
  deps = [
    "@angular//packages/platform-browser/animations",
    "@rxjs",
    "//src/cdk/collections",
    "//src/lib/paginator",
    "//src/lib/sort",
    ":table",
  ]
)

ng_web_test_suite(
  name = "unit_tests",
  deps = [":table_test_sources"],
)
